package fakultaetenrechner;

import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class MyException extends Exception{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public MyException(){
		super();
	}
	
	public MyException(String message){
		Toolkit.getDefaultToolkit().beep();
		JFrame fenster = new JFrame("Fehlermeldung");
		// fenster.setDefaultCloseOperation(fenster.EXIT_ON_CLOSE);
		JLabel label = new JLabel(message, JLabel.CENTER);
		fenster.add(label);
		fenster.setSize(300, 100);
		fenster.setLocation(420, 150);
		fenster.setVisible(true);
	}

}
